lang = 'bg';

$(document).ready(function(){
	lang = $('#lang').html();

	$('#logout_everywhere').click(function(e){
		e.preventDefault();
		
		$('.span_logout_link').show();
		
		$.ajax({
			url 	 : localizeUrl('/account/settings/logout'),
			type	 : 'get',
			complete : function(){
				$('.span_logout_link').hide();
				$('#logout_message').show();
			}
		});
	});
});


function localizeUrl(myurl){
	return "/" + lang + myurl;
}
